//引入封装后的axios
import axios from '../../axios.js';
const PARKINGS = '/parkings';
const parkings = {
    getParkings(params) {
        return axios({
            url: PARKINGS + '/getParkings',
            method: 'get',
            params
        });
    },

    //验证用户要修改的信息能否修改
    checkCanChangeModify(data) {
        return axios({
            url: PARKINGS + '/checkCanChangeModify',
            method: 'post',
            data
        });
    },

    //确认要修改的停车位信息
    modifyParkings(data) {

        return axios({
            url: PARKINGS + '/modifyParkings',
            method: 'post',
            data
        });
    },

    addParking(data){
        return axios({
            url: PARKINGS + '/addParking',
            method: 'post',
            data
        })
    },

    amendState(data){
        return axios({
            url: PARKINGS + '/amendState',
            method: 'post',
            data
        })
    },

    deleteParkings(data) {
        return axios({
            url: PARKINGS + '/deleteParkings',
            method: 'post',
            data
        });
    },
}
export default parkings;